<?php

namespace Application\Model;

use Zend\Form\Annotation;

class Utilisateur {
	public $id;
	public $prenom;
	public $nom;
	public $email;
	public $mdp;
	public $dateCreation;
	public $roleId;/*identifiant du role*/
	public $categorie;/*libelle du role*/
	public $agenceId;/*identifiant de l agence*/
	public $agenceLibelle;/*libelle de l agence*/
	
	public function exchangeArray($data)
	{
		$this->id = (isset($data['id'])) ? $data['id'] : null;
		$this->prenom = (isset($data['prenom'])) ? $data['prenom'] : null;
		$this->nom = (isset($data['nom'])) ? $data['nom'] : null;
		$this->email = (isset($data['email'])) ? $data['email'] : null;
		$this->mdp = (isset($data['mdp'])) ? $data['mdp'] : null;
		$this->dateCreation = (isset($data['dateCreation'])) ? $data['dateCreation'] : date('Y-m-d H:i:s');
		$this->roleId = (isset($data['roleId'])) ? $data['roleId'] : null;
		$this->categorie = (isset($data['categorie'])) ? $data['categorie'] : null;
		$this->agenceId = (isset($data['agenceId'])) ? $data['agenceId'] : null;
		$this->agenceLibelle = (isset($data['agenceLibelle'])) ? $data['agenceLibelle'] : null;
	}
}
